<?php

namespace app\home\controller;

use think\Controller;

class Index extends Controller
{
    public function index()
    {
        return $this->fetch();
    }

    public function send()
    {
        if (sendMail('297750182@qq.com', '这是一封测试邮件', 'test')) {
            $this->success('邮件发送成功');
        } else {
            $this->error('邮件发送失败');
        }
    }
}
